package com.dts.evaluate.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

import com.dts.evaluate.bean.Worker;
import com.dts.evaluate.utils.SocketUtil;

public class KeepSocketHeartService extends Service {

    public static Worker worker;

    public KeepSocketHeartService() {

    }

    @Override
    public IBinder onBind(Intent intent) {
        // TODO: Return the communication channel to the service.
        throw new UnsupportedOperationException("Not yet implemented");
    }

    @Override
    public void onCreate() {
        super.onCreate();
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        //发送心跳包，保持长连接
        SocketUtil.sendHeartMsg();

        return super.onStartCommand(intent, flags, startId);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
    }
}
